package org.x.yuenovel.service;

import org.x.yuenovel.controller.param.RegisterParam;
import org.x.yuenovel.domain.UserInfo;

/**
 * @author xuezhendong
 * @date 2022/4/15 10:30 下午
 */
public interface UserInfoService {

    /**
     * 邮箱是否注册
     *
     * @param mail mail
     * @return boolean
     */
    UserInfo getUserInfoByMailOrName(String mail, String name);

    /**
     * 登录
     *
     * @return token
     */
    String login(String username, String password);

    /**
     * 通过username查询用户
     *
     * @return UserInfo
     */
    UserInfo queryUserByUsername(String username);

    /**
     * 注册
     *
     * @param registerParam registerParam
     * @return boolean
     */
    Boolean register(RegisterParam registerParam);
}